package com.atguigu.ssyx.cart.service;

import com.atguigu.ssyx.model.order.CartInfo;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * ClassName: CartInfoService
 * Package: com.atguigu.ssyx.cart.service
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-10-05
 * Time: 10:38
 */

public interface CartInfoService {
    //添加商品到购物车
    //添加内容 当前登录用户Id skuId 商品数据
    void addToCart(Long userId, Long skuId, Integer skuNum);

    //根据skuId删除购物车
    void deleteCart(Long skuId, Long userId);

    //清空购物车
    void deleteAllCart(Long userId);

    //批量删除购物车 skuId
    void batchDeleteCart(List<Long> skuIdList,Long userId);

    //购物车列表接口
    List<CartInfo> getCartList(Long userId);


    //获取购物车选中的商品
    List<CartInfo> getCartCheckedList(Long userId);

    //订单生成完成之后 根据userId删除购物车选中记录
    void deleteCartCheck(Long userId);
}
